//1.首先引入封装http.js文件，调用抛出的http
import {
	http
} from './storehttp.js'

// 接口路径
let url = {
	adminlogin: 'admin/login',
	getBaseStoreInfo: 'admin/getBaseStoreInfo',
	setStore: 'admin/setStore',
	upPwd: 'admin/upPwd',
	getMarksList: 'admin/getMarksList',
	saveMarks: 'admin/saveMarks',
	setGoodMarks: 'admin/setGoodMarks',
	createStoreActivity: 'admin/createStoreActivity',
	getGoodsAllowActivity: 'admin/getGoodsAllowActivity',
	getStoreOrderList: 'admin/getStoreOrderList',
	getStoreActivity: 'admin/getStoreActivity',
	getStoreCenter: 'admin/getStoreCenter',
	getGoodListByStore: 'admin/getGoodListByStore',
	saveGoods: 'admin/saveGoods',
	getSystemCate: 'admin/getSystemCate',
	getGoodByCode: 'admin/getGoodByCode',
	setGoodStatus: 'admin/setGoodStatus',
	getGoodActivity: 'admin/getGoodActivity',
	saveGoodActivity: 'admin/saveGoodActivity',
	getStoreOrderDetail: 'admin/getStoreOrderDetail',
	sendGood: 'admin/sendGood',
	getAfterSales: 'admin/getAfterSales',
	getServiceDetail: 'admin/getServiceDetail',
	reject: 'admin/reject',
	refundAmount: 'admin/refundAmount',
	applyShopExtractAmount: 'admin/applyShopExtractAmount',
	getShopExtractRecord: 'admin/getShopExtractRecord',
	bank: 'admin/bank',
	getBank: 'admin/getBank',
	stopActivity: 'admin/stopActivity',

}

//抛出数据
module.exports = {
	// 终止活动
	stopActivity(params) {
		return http({
			url: url.stopActivity,
			data: params,
			method:'post'
		})
	},
	// 获取银行卡
	getBank(params) {
		return http({
			url: url.getBank,
			data: params,
			method:'get'
		})
	},
	// 获设置银行卡
	bank(params) {
		return http({
			url: url.bank,
			data: params,
			method:'post'
		})
	},
	// 商铺提现列表
	getShopExtractRecord(params) {
		return http({
			url: url.getShopExtractRecord,
			data: params,
			method:'post'
		})
	},
	// 商铺申请提现
	applyShopExtractAmount(params) {
		return http({
			url: url.applyShopExtractAmount,
			data: params,
			method:'post'
		})
	},
	// 同意退款
	refundAmount(params) {
		return http({
			url: url.refundAmount,
			data: params,
			method:'post'
		})
	},
	// 售后驳回
	reject(params) {
		return http({
			url: url.reject,
			data: params,
			method:'post'
		})
	},
	// 售后详情
	getServiceDetail(params) {
		return http({
			url: url.getServiceDetail,
			data: params,
			method:'get'
		})
	},
	// 获取申请售后列表
	getAfterSales(params) {
		return http({
			url: url.getAfterSales,
			data: params,
			method:'get'
		})
	},
	// 确认发货
	sendGood(params) {
		return http({
			url: url.sendGood,
			data: params,
			method:'post'
		})
	},
	// 获取店铺订单详情
	getStoreOrderDetail(params) {
		return http({
			url: url.getStoreOrderDetail,
			data: params,
			method:'get'
		})
	},
	// 创建/编辑商品活动
	saveGoodActivity(params) {
		return http({
			url: url.saveGoodActivity,
			data: params,
			method:'post'
		})
	},
	// 获取设置促销活动数据
	getGoodActivity(params) {
		return http({
			url: url.getGoodActivity,
			data: params,
			method:'get'
		})
	},
	// 设置商品上下架
	setGoodStatus(params) {
		return http({
			url: url.setGoodStatus,
			data: params,
			method:'post'
		})
	},
	// 根据code获取商品信息
	getGoodByCode(params) {
		return http({
			url: url.getGoodByCode,
			data: params,
			method:'get'
		})
	},
	// 获取店铺类目
	getSystemCate(params) {
		return http({
			url: url.getSystemCate,
			data: params,
			method:'get'
		})
	},
	// 添加/编辑商品
	saveGoods(params) {
		return http({
			url: url.saveGoods,
			data: params,
			method:'post'
		})
	},
	// 管理端管理后台页面
	getStoreCenter(params) {
		return http({
			url: url.getStoreCenter,
			data: params,
			method:'get'
		})
	},
	// 获取店铺商品列表
	getGoodListByStore(params) {
		return http({
			url: url.getGoodListByStore,
			data: params,
			method:'get'
		})
	},
	// 获取店铺创建的活动
	getStoreActivity(params) {
		return http({
			url: url.getStoreActivity,
			data: params,
			method:'get'
		})
	},
	// 获取店铺订单列表
	getStoreOrderList(params) {
		return http({
			url: url.getStoreOrderList,
			data: params,
			method:'get'
		})
	},
	// 获取可添加店铺活动的商品
	getGoodsAllowActivity(params) {
		return http({
			url: url.getGoodsAllowActivity,
			data: params,
			method:'get'
		})
	},
	// 创建店铺活动
	createStoreActivity(params) {
		return http({
			url: url.createStoreActivity,
			data: params,
			method:'post'
		})
	},
	// 选择店铺商品标签
	setGoodMarks(params) {
		return http({
			url: url.setGoodMarks,
			data: params,
			method:'post'
		})
	},
	// 添加店铺商品标签
	saveMarks(params) {
		return http({
			url: url.saveMarks,
			data: params,
			method:'post'
		})
	},
	// 获取商家标签数据
	getMarksList(params) {
		return http({
			url: url.getMarksList,
			data: params,
			method:'get'
		})
	},
	// 修改密码
	upPwd(params) {
		return http({
			url: url.upPwd,
			data: params,
			method:'post'
		})
	},
	// 设置店铺信息
	setStore(params) {
		return http({
			url: url.setStore,
			data: params,
			method:'post'
		})
	},
	// 获取商家端信息
	getBaseStoreInfo(params) {
		return http({
			url: url.getBaseStoreInfo,
			data: params,
			method:'get'
		})
	},
	// 登录
	adminlogin(params) {
		return http({
			url: url.adminlogin,
			data: params,
			method:'post'
		})
	},

}